import { CreateTime } from '@/types/global';
import { TUser } from "@/api/subsidy";

export interface MenuAuthParam {
  paramKey?: string;
  paramValue?: string;
}
export interface MenuAuth {
  icon?: string;
  id?: string;
  name?: string;
  openflag?: string;
  parentId?: string;
  portalId?: string;
  sortNumber?: number;
  type?: string;
  url?: string;
  params?: MenuAuthParam[];
}
export interface PortalAuth {
  icon: string;
  id: string;
  menuAuths: MenuAuth[];
  name: string;
  sysInnerFlag: string;
  terminal: string;
  url: string;
}
export interface OrganizationAuths {
  id?: string;
  name?: string;
  parentId?: string;
  type?: string;
}
export interface ResourceAuths {
  code?: string;
  description?: string;
  enableFlag?: number;
  id?: string;
  menuId?: string;
  name?: string;
  sysInnerFlag?: string;
  type?: string;
}
export interface Position {
  code?: string;
  id?: string;
  leaderPositionId?: string;
  leaderPositionName?: string;
  level?: string;
  levelName?: string;
  name?: string;
  organizationId?: string;
  organizationName?: string;
  simpleName?: string;
  sysInnerFlag?: string;
  type?: string;
}
export interface Resource {
  authControl?: boolean;
  code?: string;
  createOrgId?: string;
  createOrgName?: string;
  createTime?: CreateTime;
  creator?: string;
  creatorName?: string;
  deleteFlag?: string;
  description?: string;
  enableFlag?: string;
  hasAuthCreateOrgCollection?: string[];
  hasAuthCreatorCollection?: string[];
  id?: string;
  menuId?: string;
  name?: string;
  newVersionTime?: number;
  operator?: string;
  operatorName?: string;
  portalId?: string;
  sysInnerFlag?: string;
  tenantId?: string;
  type?: string;
  url?: string;
  versionTime?: number;
}
export interface Role {
  description?: string;
  id?: string;
  name?: string;
  parentId?: string;
  parentName?: string;
  sysAdminFlag?: string;
  sysInnerFlag?: string;
  tenantId?: string;
  type?: string;
  typeName?: string;
}
export interface User {
  address?: string;
  authCodes?: string[];
  authOrgSet?: string[];
  authOtherUserSet?: string[];
  card?: string;
  code?: string;
  createOrgId?: string;
  createOrgName?: string;
  createTime?: CreateTime;
  createTime4View?: string;
  creator?: string;
  creatorName?: string;
  currentOrgId?: string;
  currentOrgName?: string;
  deleteFlag?: string;
  email?: string;
  firstEdu?: string;
  forbidVisitPaths?: string[];
  gender?: string;
  highEdu?: string;
  id?: string;
  isVisible?: string;
  loginName?: string;
  loginPwdTxt?: string;
  name?: string;
  namePinYin?: string;
  newVersionTime?: number;
  operator?: string;
  operatorName?: string;
  phone?: string;
  positions?: Position[];
  postCode?: string;
  resources?: Resource[];
  roles?: Role[];
  sessionId?: string;
  status?: string;
  statusName?: string;
  tenantId?: string;
  terminal?: string;
  type?: string;
  versionTime?: number;
}
export interface UserInfo {
  portalAuths?: PortalAuth[];
  menus?:string[];
  user: TUser;
}
